<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>导入错误信息</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						$("#back_button")
								.click(
										function() {
											document.theForm.action = "${basePath}/${backUrl}";
											document.theForm.submit();
										});
					});
	function copyErrorMessage(content) {
		var s = content;
		s = s.replaceAll("<BR>", "\r\n");
		window.clipboardData.setData("Text", s);
		alert("复制成功!");
	}
</script>
</head>
<body id="body">
	<form action="#" name="theForm" id="theForm" method="post">
		<div id="successMessage"
			style="font-size: 12px; font: normal; text-align: left; padding-left: 12px; padding-top: 25px; color: red;">
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;项目：${project}&nbsp;&nbsp;&nbsp;&nbsp;
			上报时间：${now?string("yyyy-MM-dd")} &nbsp;&nbsp; 用时：${(estimatedTime)!}
			&nbsp;&nbsp; 是否成功：${(flag)!} &nbsp;&nbsp; 总共：${(Count)!}条,
			&nbsp;&nbsp; 成功：${(sucessCout)!}条, &nbsp;&nbsp; 失败：${(failCout)!}条

		</div>
		<table class="table-border">
			<c:set var="content" value="${errorTitle}:\r\n"></c:set>
			<c:if test="${flag not empty && flag=='部分成功'}">
				<tr>
					<td>详细明细</td>
					<td>上报失败原因</td>
				</tr>
				<c:forEach items="${errorList}" var="item">
					<c:set var="content" value="${content}${item}\r\n"></c:set>
					<tr>
						<td>${item.detal}</td>
						<td>${item.reason}</td>
					</tr>
				</c:forEach>
				<tr>
					<td colspan="2"><span style="text-align: center;"><font
							style="font-weight: bold; font-size: 13px;">本次导入部分失败，总共导入${(Count)!}条记录，成功${(sucessCout)!}条记录，失败${(failCout)!}条记录！</font></span></td>
				</tr>
			</c:if>
			<c:if test="${flag not empty && flag=='全部失败'}">
				<tr>
					<td>详细明细</td>
					<td>上报失败原因</td>
				</tr>
				<c:forEach items="${errorList}" var="item">
					<c:set var="content" value="${content}${item}\r\n"></c:set>
					<tr>
						<td>${item.detal}</td>
						<td>${item.reason}</td>
					</tr>
				</c:forEach>
				<tr>
					<td colspan="2"><span style="text-align: center;"><font
							style="font-weight: bold; font-size: 13px;">本次导入全部失败，总共导入${(Count)!}条记录，成功${(sucessCout)!}条记录，失败${(failCout)!}条记录！！</font></span></td>
				</tr>
			</c:if>
			<c:if test="${flag not empty && flag=='全部成功'}">
				<tr>
					<td colspan="2"><span style="text-align: center;"><font
							style="font-weight: bold; font-size: 13px;">本次导入全部失败，总共导入${(Count)!}条记录，成功${(sucessCout)!}条记录，失败${(failCout)!}条记录！！</font></span></td>
				</tr>
			</c:if>
		</table>
		<div class="navButton">
			<input type="button" value="复制错误信息" name="save_button" class="inputButton"
				id="save_button" onmouseover="this.className='button_mouseover'"
				onmouseout="this.className='button'" style="width: 120px;"
				onclick="javascript:copyErrorMessage('${content}');" /> <input
				type="button" id="back_button" class="inputButton" value="返回"
				onmouseover="this.className='button_mouseover'"
				onmouseout="this.className='button'" />
		</div>
	</form>
	</div>
</body>
</html>
